|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEMTool.EMText
public class EMText
Field Summary | |
---|---|
(package private) java.lang.String |
serverIP
|
(package private) java.lang.String |
serverpassword
|
(package private) java.lang.String |
serverusername
|
(package private) java.lang.String |
username
|
Fields inherited from interface EMTool.EMInterface |
---|
DEVICEDOESNOTEXIST, FAILURE, NODEVICESFOUND, NOUSERSFOUND, SUCCESS, USERDOESNOTEXIST |
Constructor Summary | |
---|---|
EMText()
|
Method Summary | |
---|---|
private java.lang.String |
generateXML(java.lang.String sRequestType,
java.lang.String sRequest,
java.lang.String sDeviceName,
java.lang.String sDeviceProfile,
java.lang.String duration)
Generate XML Request as a String. |
void |
init(java.lang.String serverIP,
java.lang.String serverUser,
java.lang.String serverPassword)
|
java.lang.String |
login(java.lang.String deviceName,
java.lang.String username,
java.lang.String deviceProfile,
java.lang.String duration)
Login the user into the device with the specificed profile |
java.lang.String |
logout(java.lang.String deviceName)
Logout any user that is currently logged into the device |
private java.lang.String |
parseXML(java.lang.String xmlResponse)
This parses the XML Resonse as a String. |
java.lang.String |
queryDevice(java.lang.String username)
Get the device name if any of the device the user is currently logged in to |
java.lang.String |
queryUser(java.lang.String deviceName)
Get the username if any of the user currently logged in to the specified device |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.lang.String serverIP
java.lang.String serverusername
java.lang.String serverpassword
java.lang.String username
Constructor Detail |
---|
public EMText()
Method Detail |
---|
public java.lang.String login(java.lang.String deviceName, java.lang.String username, java.lang.String deviceProfile, java.lang.String duration)
EMInterface
login
in interface EMInterface
deviceName
- Device name of device to login tousername
- User to log indeviceProfile
- Device profile to useduration
- null for infinite or number of minutes to remain logged in
public java.lang.String logout(java.lang.String deviceName)
EMInterface
logout
in interface EMInterface
deviceName
- Device name of device to logout of
public java.lang.String queryUser(java.lang.String deviceName)
EMInterface
queryUser
in interface EMInterface
public java.lang.String queryDevice(java.lang.String username)
EMInterface
queryDevice
in interface EMInterface
private java.lang.String generateXML(java.lang.String sRequestType, java.lang.String sRequest, java.lang.String sDeviceName, java.lang.String sDeviceProfile, java.lang.String duration)
sRequestType
- "login/logout" for login or logout, any other value for query.sRequest
- login, logout, device or user depending on the value of sRequestTypesDeviceName
- Device name used by login, logout and deviceUserQuerysDeviceProfile
- Device profile name used by loginduration
- Number of seconds or indefinite, used by login
private java.lang.String parseXML(java.lang.String xmlResponse)
xmlResponse
- Either EMInterface.SUCCESS
, EMInterface.NODEVICESFOUND
or EMInterface.FAILURE
plus the text of the error.
public void init(java.lang.String serverIP, java.lang.String serverUser, java.lang.String serverPassword)
init
in interface EMInterface
serverIP
- This is the IP address of the server running the EM ServicesserverUser
- Username of a user with that can execute EM command via the EMServices interface
This user must either be the user assigned to the device on which the operation is performed, or a user
with the "Standard EM Autheticatio Proxy Rights" role. This parameter is used as the AppID in the AppInfo objectserverPassword
- Password for the server USer. This parameter is used as the AppCertificate in the AppInfo object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |